package org.example.carsystem.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.carsystem.domain.SysUser;
import org.example.carsystem.domain.dto.SysUserDTO;

import java.util.Date;
import java.util.List;

@Mapper
public interface UserMapper {

    List<SysUser> usersSelect(@Param("deptId") Long deptId, @Param("userName") String userName, @Param("phoneNumber") String phoneNumber, @Param("status") String status,
                              @Param("createStartTime") Date createStartTime, @Param("createEndTime") Date createEndTime);

    void usersAdd(SysUserDTO sysUserDTO);

    void usersPostAdd(Long userId,Long[] postIds);

    void usersRolesAdd(Long userId,Long[] roleIds);

    SysUserDTO SelectById(Long userId);

    void DeleteUser(Long[] userId);

    void updateUser(SysUserDTO sysUserDTO);

    void updateUserStatus(@Param("updateBy") String updateBy,@Param("userId") Long userId,@Param("status") String status);

    void DeleteUserRoles(Long[] userId);

    void DeleteUserPost(Long[] userId);

    void userImport(List<SysUser> cachedDataList);
}
